import { Notify, LocalStorage } from 'quasar'

export function fail (state, payload) {
  console.log(payload.response.data)
  Notify.create('用户名或密码错误')
  state.loading = false
}

export function logined (state, payload) {
  LocalStorage.set('admin-token', payload['access'])
  state.loading = false
  window.location.reload()
}
